package com.trial.personal;

import android.app.Activity;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;

public class PageActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.page);
		
		WebView main = (WebView) findViewById(R.id.webView1);
		main.clearCache(true);
		main.clearHistory();
		main.clearView();
		
		main.getSettings().setJavaScriptEnabled(true);
		main.loadUrl(getIntent().getStringExtra("URL"));
		
		NotificationManager manger = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
		
		manger.cancel(1557);
		
		
		final Button stopCheck = (Button) findViewById(R.id.buttonStopCheck);
		
		stopCheck.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
				Intent myIntent = new Intent(getBaseContext(), WebShareActivity.class);
                startActivityForResult(myIntent, 0);
			}
		});
	}

	@Override
	protected void onNewIntent(Intent intent) {
		// TODO Auto-generated method stub
		super.onNewIntent(intent);
		Log.d("NewIntent", "New intent occure");
		
	}

}
